package crazyFace.system.app;

import java.util.List;

import android.graphics.Bitmap;

public class Player extends Entity{

	public Player(GameView gameView, Bitmap bmp) {
		super(gameView, bmp, 4, 3);
		speed = 10;
		life = 100;
		dstwidth = 40;
		dstheight = 48;
		isRows = true;
	}
	
	@Override
	public void move(){
		
	}
	
	@Override
	protected void update() {


		
		super.update();
	}
	
	public void hert(float dam) {
		life -= dam;
	}
	
	@Override
	public void heal() {
		life += 60 / GameView.gameDif;
		if(life > maxHealth){
			life = maxHealth;
		}
	}
	
	public void coinCollision(List<Coin> coins){
		for(int i = 0; i < coins.size(); i++){
			if(coins.get(i).getMe().intersect(getMe())){
				GameView.score++;
				coins.remove(i);
			}
		}
	}

}
